package com.ys.erp.entity.data.bean;

import com.baomidou.mybatisplus.annotation.*;
import io.micrometer.core.instrument.Meter;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

/**
 * @author 南山
 * @date 2025/09/19 17:13
 */

@Data
@TableName(value = "t_activity_turnable_prized")
public class ActivityTurntablePrized {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField(value = "activity_id")
    private Long activityId;

    @TableField(value = "type")
    private String type;

    @TableField(value = "quantity_per_prize")
    private Long quantityPerPrize;

    @TableField(value = "total")
    private Long total;

    @TableField(value = "winning_rate")
    private String winnerRate;

    @TableField(value = "prized_name")
    private String prizedName;

    @TableField(value = "prized_icon")
    private String prizedIcon;

    @TableField(value = "prized_id")
    private Long prizedId;


    @TableField(value = "version")
    @Version
    private Integer version;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;

    @AllArgsConstructor
    @Getter
    public enum Enums {

        YS_MONEY,
        COUPON,
        YS_PULSE,
        GOODS,
        CUSTOM,
        NOT_PRIZED,

    }

    public static final Map<String, String> ENUM_MAP = new HashMap<>();

    static {
        ENUM_MAP.put(Enums.YS_MONEY.toString(), "幺币");
        ENUM_MAP.put(Enums.COUPON.toString(), "优惠卷");
        ENUM_MAP.put(Enums.YS_PULSE.toString(), "幺豆");
        ENUM_MAP.put(Enums.GOODS.toString(), "商品");
        ENUM_MAP.put(Enums.CUSTOM.toString(), "自定义");
        ENUM_MAP.put(Enums.NOT_PRIZED.toString(), "感谢参与");

    }

}
